﻿@model CustomerOrderListModel
@using Nop.Web.Models.Customer;
@using Nop.Web.Extensions;
@using Nop.Web.Framework;
@{
    Layout = "~/Themes/CNet/Shared/_HomePage_SubTwo.cshtml";
    //title
    Html.AddTitleParts(T("PageTitle.Account").Text);
    
}

@section userInfo
{
    <div class="user_name_left">
<p><b>@Model.customerModel.Username</b><br />
手机号码：@Model.customerModel.Phone<br />
地址：@Model.customerModel.StreetAddress</p>
</div>
@*<div class="user_name_right">设置</div>*@
}

@section left
{
@Html.Partial("MyMenuNavigation", Model.NavigationModel, new ViewDataDictionary())
}
@section right
{
        <div class="user_right_xx" >
      <div class="user_right_xx_table_div">
       <table width="0" border="0" style="border:1px solid #ddd;">
          <tr>
            <td height="38" bgcolor="#eeeeee" class="xx_tiame"><b>订单号</b></td>
            <td height="38" bgcolor="#eeeeee" class="xx_tiame"><b>订单商品</b></td>
            <td height="38" bgcolor="#eeeeee" class="xx_tiame"><b>收货人</b></td>
            <td height="38" bgcolor="#eeeeee" class="xx_tiame"><b>订单金额</b></td>
            <td height="38" bgcolor="#eeeeee" class="xx_bz"><b>下单时间</b></td>
            <td height="38" bgcolor="#eeeeee" class="xx_tiame"><b>状态</b></td>
          </tr>
          @foreach (var orderModel in Model.Orders)
          {
              <tr>
                <td class="xx_tiame">@orderModel.OrderNumber</td>
                <td class="xx_tiame"><a href="@Url.RouteUrl("ProductBuy", new { priductId = orderModel.ProductModel.Count>0?orderModel.ProductModel.FirstOrDefault().ProductId:0 })"><img src="@(orderModel.ProductModel.Count>0?orderModel.ProductModel.FirstOrDefault().ProDefaultPictureModel.ImageUrl:"--")" width="40px" height="60px" /></a></td>
                <td class="xx_tiame"><br />
                  <span class="font01">@orderModel.CustomerModel.Username</span></td>
                <td class="xx_tiame"><b class="font05">@orderModel.OrderTotal</b></td>
                <td class="xx_tiame">@orderModel.CreatedOn</td>
                <td class="xx_tiame">@orderModel.OrderStatus</td>
              </tr>
          }
</table>
<div class="clearfix">
<div class="pagin fr"> @{
            var pager = Html.Pager(new Nop.Web.Models.Common.PagerModel()
            {
                PageSize = Model.TopicPageSize,
                TotalRecords = Model.TopicTotalRecords,
                PageIndex = Model.TopicPageIndex,
                ShowTotalSummary = false,
                RouteActionName = "OrderInfoRoute",
                UseRouteLinks = true,
                RouteValues = new Nop.Web.Models.Common.RouteValues { page=Model.TopicPageIndex  }
            });
        }
        @pager
</div>
</div>
      </div>
}
